import request from '@/utils/request'

const {
    get: $get,
    post: $post,
    delete: $delete,
    download: $download
} = request



// 查询城市预警结果信息列表
export const cityWaringResultPage = data => {
    return $get('/risk/cityWaringResult/page', data)
}

// 查询城市预警结果信息详情
export const cityWaringResultDetail = id => {
    return $get('/risk/cityWaringResult/detail/'+ id)
}


// 导出城市预警结果信息
export const cityWaringResultExport = (data,fileName) => {
    return $download('/risk/cityWaringResult/export',data, fileName)
}

// 指标诊断分页查询
export const indicatorDiagnosisPage = data =>{
  return $get('/risk/cityWaringResult/indicatorDiagnosis/page', data)
}

// 指标诊断详情
export const indicatorDiagnosisDetail = data =>{
  return $get('/risk/cityWaringResult/indicatorDiagnosis/detail',data)
}

// 指标诊断导出
export const indicatorDiagnosisExport = (data, fileName)=>{
  return $download('/risk/cityWaringResult/indicatorDiagnosis/export',data, fileName)
}

// 指标诊断历史记录
export const indicatorDiagnosisHistory = data =>{
  return $get('/risk/cityWaringResult/indicatorDiagnosis/history',data)
}

// 城市诊断信息
export const cityDiagnosis = data =>{
  return $get('/risk/cityWaringResult/cityDiagnosis', data)
}

// 城市诊断列表导出
export const  cityDiagnosisListExport = (data, fileName) =>{
  return $download('/risk/cityWaringResult/cityDiagnosisListExport',data, fileName)
}

// 空间分析
export const spaceAnalysis = data =>{
  return $get('/risk/cityWaringResult/spaceAnalysis',data)
}

// 空间分析导出
export const  spaceAnalysisExport = (data, fileName) =>{
  return $download('/risk/cityWaringResult/spaceAnalysisExport',data, fileName)
}

// 城市详情
export const cityDetail = data =>{
  return $get('/risk/cityWaringResult/cityDetail',data)
}

// 城市详情导出
export const cityDetailExport = (data, fileName) =>{
  return $download('/risk/cityWaringResult/cityDetailExport',data, fileName)
}

// 城市汇总详情
export const cityDetailDetail = data => {
  return $get('/risk/cityWaringResult/cityDetailDetail',data)
}

// 城市汇总详情区域数据
export const cityTargetAreaCount = data =>{
  return $get('/risk/cityWaringResult/cityTargetAreaCount',data)
}

// 城市汇总详情导出
export const cityDetailDetailExport = (data, fileName) => {
  return $download('/risk/cityWaringResult/cityDetailDetailExport',data, fileName)
}

// 共识问题识别
export const publicProblem = data =>{
  return $get('/risk/cityWaringResult/publicProblem',data)
}

// 共识问题识别导出
export const publicProblemExport = (data, fileName) =>{
  return $download('/risk/cityWaringResult/publicProblemExport',data, fileName)
}

// 城市辅助====================
// 分页
export const cityPolicyMakePage = data =>{
  return $get('/risk/cityPolicyMake/page',data)
}

// 新增
export const cityPolicyMakeAdd = data =>{
  return $post('/risk/cityPolicyMake/add', data)
}

// 详情
export const cityPolicyMakeDetail = id =>{
  return $get('/risk/cityPolicyMake/detail/'+id)
}

// 修改
export const cityPolicyMakeUpdate = data =>{
  return $post('/risk/cityPolicyMake/update', data)
}

// 导出
export const cityPolicyMakeExport = (data, fileName) =>{
  return $download('/risk/cityPolicyMake/export',data, fileName)
}

// 城市辅助====================

// 城市对比分析
export const contrastAnalysis = data =>{
  return $get('/risk/cityWaringResult/contrastAnalysis', data )
}

// 城市对比分析导出
export const contrastAnalysisExport = (data, fileName) =>{
  return $download('/risk/cityWaringResult/contrastAnalysisExport', data, fileName)
}

// 城市指标维度树
export const dimensionTree = data =>{
  return $get('/risk/cityTargetDimension/dimensionTree', data)
}

// 城市指标分页
export const cityCheckTargetPage = data =>{
  return $get('/risk/cityCheckTarget/page', data)
}

// 【分析诊断总览】=====================================

export const overviewOneTargetSelect = data=>{
  return $get('/risk/cityWaringResult/overview/oneTargetSelect', data)
}

// 指标体系汇总
export const overviewSummary = data =>{
  return $get('/risk/cityWaringResult/overview/summary', data)
}

// 城市对比分析
export const overviewCityContrastAnalysis = data =>{
  return $get('/risk/cityWaringResult/overview/cityContrastAnalysis', data)
}

// 指标诊断信息
export const overviewIndicatorDiagnosticInfo = data =>{
  return $get('/risk/cityWaringResult/overview/indicatorDiagnosticInfo', data)
}

// 城市详情信息
export const overviewCityDetailInfo = data =>{
  return $get('/risk/cityWaringResult/overview/cityDetailInfo', data)
}

// 城市诊断信息
export const overviewUrbanDiagnosticInfo = data =>{
  return $get('/risk/cityWaringResult/overview/urbanDiagnosticInfo', data)
}

// 共性问题
export const overviewPublicProblem = data =>{
  return $get('/risk/cityWaringResult/overview/publicProblem', data)
}

// 共性问题详情
export const overviewPublicProblemDetail = data =>{
  return $get('/risk/cityWaringResult/overview/publicProblem/detail', data)
}

// 空间分析
export const overviewSpaceAnalysis = data =>{
  return $get('/risk/cityWaringResult/overview/spaceAnalysis', data)
}


// 空间分析--新的
export const spaceAnalysisNew = data =>{
  return $get('/risk/cityWaringResult/spaceAnalysisNew',data)
}
